package excercise;

import java.util.Scanner;

public class EX05_Q31 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println("card 번호를 입력하세요.");
		
		
		BankVO card = new BankVO();
		Scanner sdc = new Scanner(System.in);
		card.setNum(sdc.nextInt());
		BankService.susic(card.getNum(),card);
		System.out.println(card.getShow());
	}
}

class BankVO{
	private int num;
	private String show;
	public BankVO() {}
	public BankVO(int num, String show) {
		this.num = num;
		this.show = show;
	}
	public void setNum(int num){this.num = num;}
	public void setShow(String show){this.show = show;}
	
	
	public int getNum(){return this.num;}
	public String getShow(){return this.show;}
}

class BankService{
	
	static String susic(int num, BankVO card){
		if(num/10000==35){JCB(num,card);}
		else if(num/100000==4){Visa(num,card);}
		else if(num/100000==5){Maestro(num,card);}
		else{card.setShow("없는 카드입니다.");}
		return card.getShow();
		}
	
	static void JCB(int num, BankVO card){
		switch(num){
			case 356317 : card.setShow("JCB NH농협카드"); break;
			case 356901 : card.setShow("JCB 신한카드"); break;
			case 356912 : card.setShow("JCB KB국민카드"); break;
			default : card.setShow("JCB 짜갑니다 신고하세요");
		}}
	
	static void Visa(int num, BankVO card){
		switch(num){
			case 404825 : card.setShow("Visa 비씨카드"); break;
			case 438676 : card.setShow("Visa 신한카드"); break;
			case 457973 : card.setShow("Visa 국민은행"); break;
			default : card.setShow("Visa 짜갑니다 신고하세요");
		}}
	
	static void Maestro(int num, BankVO card){
		switch(num){
			case 515594 : card.setShow("Maestro 신한카드"); break;
			case 524353 : card.setShow("Maestro 외환카드"); break;
			case 540926 : card.setShow("Maestro 국민은행"); break;
			default : card.setShow("Maestro 짜갑니다 신고하세요");
		}}
	
}

